import React, {Component} from 'react';
import {View, Text, Button} from 'react-native';
import NavigationFactory from '../../utils/navigationFactory';

@NavigationFactory
class Page2 extends Component {
  render() {
    const {navigation, route} = this.props;
    const params = route.params;
    return (
      <View>
        <Text>{params.name}</Text>
        <Button
          title={'跳转到mode导航'}
          onPress={() => {
            navigation.navigate('Page3');
          }}
        />
      </View>
    );
  }
}

export default Page2;
